Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 90

Bonzo
Apple Fan
Profile
Posts: 780
Reg: Jan 30, 2012
Basingstoke
13,500
03/01/13 02:53 PM (11 years ago)

remove back button from specific screen

is it possible to remove the back button from a specific screen ? Not a specific plugin, the actual screen. For example. i may have 4 menu button plugin screens. only one one specific screen i would want to remove the back button Is this possible ? Thanks
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
03/01/13 03:00 PM (11 years ago)
Do you need to maintain the nav bar?
 
Bonzo
Apple Fan
Profile
Posts: 780
Reg: Jan 30, 2012
Basingstoke
13,500
like
03/01/13 03:03 PM (11 years ago)
no. i would still like the back button on all other screens though. but i never use the right nav button
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
03/01/13 03:26 PM (11 years ago)
I mean if on that screen you choose to hide the nav bar, the back button will not appear
 
Bonzo
Apple Fan
Profile
Posts: 780
Reg: Jan 30, 2012
Basingstoke
13,500
like
03/01/13 03:31 PM (11 years ago)
sorry. mis understood. Yes i want the nav bar because i will replace the back button with a right nav button to do something else
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/01/13 03:53 PM (11 years ago)
You can change the leftbarbutton to a blank button, but it might remove it altogether, in which case you'd need to add it back in whatever screens are available from that one
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
03/01/13 04:17 PM (11 years ago)
I wouldn't know how to do it, but it seems you could do it but for all the screens of that plugin. What I sometimes do, when I need that is duplicate the plugins in my control panel. For example, I'm using the ipad book plugin. In some pages I want the sound effect to start immediately when pages opens. In other cases I want it to start, only if you click on the icon for sound. To have the sound start automatically, some code had to be added to the plugin. But, if I added the code then all screens would behave that way. What I did was, I duplicated the plugin. On one of them I changed the name of the plugin and added the code needed to start sound automatically and uploaded it to my control panel. Then in some screens I used the normal plugin, in other the modified plugin. Miguel
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/01/13 04:20 PM (11 years ago)
If you need to make a change to a particular instance of a plugin but not all instances, you can do this by doing an if/then check on one of the json values (either a custom json value if you need to make this most extendable, or using the 'titleText' or 'itemId' or something similar if you know at build time the particular screen that will have the change).
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/02/13 05:21 AM (11 years ago)
if it is for only one screen add this to the bottom of view will appear method of the plugin .m file if ([[BT_strings getJsonPropertyValue:self.screenData.jsonVars :@"itemNickname" :@""] isEqualToString:@"yourScreenNickname"]){ self.navigationItem.leftBarButtonItem=nil; } substitute "yourScreenNickname" with the nickname of the screen you want the back button hiding.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.